{{define "title"}}{{.topic.Title}} - 增加附言{{end}}
{{define "content"}}
<div class="row">
	<div class="col-md-9 col-sm-6">
		<div class="sep20"></div>

		<ol class="breadcrumb">
			<li><a href="/">首页</a></li>
			<li><a href="/topics">主题</a></li>
			<li><a href="/topics/{{.topic.Tid}}">{{.topic.Title}}</a></li>
			<li class="active">增加附言</li>
		</ol>
		<div class="page box_white">
			<form class="form-horizontal validate-form" role="form" action="/append/topic/{{.topic.Tid}}" data-redirect="/topics/{{.topic.Tid}}?r={{timestamp}}">
				<div class="form-group form-group-sm">
					<label class="col-sm-1 control-label" for="content">附言</label>
					<div class="col-sm-11">
						<div class="row clearfix md-toolbar">
							<ul class="col-md-10 list-inline">
								<li class="edit cur"><a href="#" tabindex="-1"><i class="glyphicon glyphicon-edit"></i> 编辑</a></li>
								<li class="preview"><a href="#" title="预览" tabindex="-1"><i class="glyphicon glyphicon-eye-open preview"></i> 预览</a></li>
							</ul>
							<div class="col-md-2 text-right">
								<i id="upload-img" class="glyphicon glyphicon-picture upload-img tool-tip" data-toggle="tooltip" data-placement="top" title="上传图片"></i>
							</div>
						</div>
						<textarea class="form-control need-autogrow main-textarea" id="content" name="content" rows="15" tabindex="0"></textarea>
						<div class="content-preview"></div>
					</div>
				</div>
				
				<div class="form-group form-group-sm cell">
					<div class="col-sm-6 col-sm-offset-5">
						<button type="submit" class="btn btn-default btn-sm" id="submit">提交</button> (Ctrl/Command+Enter)
					</div>
				</div>
				<div class="form-group form-group-sm">
					<label class="col-sm-1 control-label">预览</label>
					<div class="col-sm-11">
						<div id="content-preview" style="border: 1px solid #ccc; padding: 5px; font-size: 13px;"></div>
					</div>
				</div>
			</form>
		</div>
	</div>
	<div class="col-md-3 col-sm-6">
		<div class="sep20"></div>

		<div class="box_white sidebar sb-author">
			<div class="top">
				<h3 class="title"><i class="glyphicon glyphicon-list-alt"></i>&nbsp;关于附言</h3>
			</div>
			<div class="sb-content">
				<span class="help-block">
					<ul>
						<li>
							请在确有必要的情况下再使用此功能为原主题补充信息
						</li>
						<li>
							每个主题至多可以附加 3 条附言
						</li>
						<li>
							创建附言价格为 15 铜币
						</li>
					</ul>
				</span>
			</div>
		</div>

	</div>
</div>
{{end}}
{{define "css"}}
<link href="//cdn.bootcss.com/select2/4.0.3/css/select2.min.css" rel="stylesheet">
{{include "cssjs/prism.css.html" .}}
{{end}}
{{define "js"}}
<script type="text/javascript" src="https://cdn.bootcss.com/select2/4.0.3/js/select2.min.js"></script>
{{include "cssjs/prism.js.html" .}}
{{include "cssjs/publish.js.html" .}}
<script type="text/javascript" src="{{.static_domain}}/static/dist/js/topic_append.min.js"></script>
<script type="text/javascript">
// 需要加载的侧边栏
SG.SIDE_BARS = [];
</script>
{{end}}